package com.gitease.quickhub.service;

import com.gitease.quickhub.model.Commit;
import com.gitease.quickhub.model.Repository;
import com.gitease.quickhub.model.RepositoryFile;
import com.gitease.quickhub.model.User;

import java.util.List;

public interface GiteeApiService {
    
    // 用户相关
    User getUserInfo(String accessToken);
    
    // 仓库相关
    List<Repository> getUserRepositories(String accessToken);
    Repository getRepository(String accessToken, String owner, String repo);
    
    // 文件相关
    List<RepositoryFile> getRepositoryContents(String accessToken, String owner, String repo, String path, String ref);
    RepositoryFile getRepositoryFile(String accessToken, String owner, String repo, String path, String ref);
    
    // 提交相关
    List<Commit> getRepositoryCommits(String accessToken, String owner, String repo, String branch);
    Commit createCommit(String accessToken, String owner, String repo, String path, String content, String message, String branch);
    
    // 分支相关
    List<String> getRepositoryBranches(String accessToken, String owner, String repo);
    
    // OAuth相关
    String getAccessToken(String code);
    String refreshAccessToken(String refreshToken);
}